<?php
$username = $this->formText('email', '', array('class' => 'login-inp'));
$password = $this->formPassword('password','', array('class' => 'login-inp', 'onkeypress' => 'handleEvent(event)'));
$btnButton = $this->formSubmit('submit', 'Login');
?>

<div id="login-inner">
	<form id="appForm" name="frm" action="" method="POST" enctype="multipart/form-data">
		<table border="0" cellpadding="0" cellspacing="0">
		<tr>
			<th>Email</th>
			<td><?php echo $username; ?></td>
		</tr>
		<tr>
			<th>Password</th>
			<td><?php echo $password; ?></td>
		</tr>
		<tr>
			<th></th>
			<td valign="top"></td>
		</tr>
		<tr>
			<th></th>
			<td><input type="button" onclick="login();" class="submit-login" /></td>
		</tr>
		</table>
	</form>
</div>
 <!--  end login-inner -->
<div class="clear"></div>
<a href="" class="forgot-pwd">Forgot Password?</a>
<script>
    function login(){
        var email = document.frm.email.value;
        var pass = document.frm.password.value;
        if(common.trim(email) === '' || common.trim(pass) === '')
        {
            alert('Sai tên đăng nhập hoặc mật khẩu');
        }else{
            document.frm.submit();
        }
    }
    function handleEvent(oEvent) {
       if(oEvent.keyCode === 13){
        login();
       }
    }
</script>


